Skip to content

#40: Added a Start Over option to clear out all previously generated code and start from scratch.#51

Open
RishiTambe wants to merge 6 commits intooss-slu:mainfrom
RishiTambe:main
Open

#40: Added a Start Over option to clear out all previously generated code and start from scratch.#51
RishiTambe wants to merge 6 commits intooss-slu:mainfrom
RishiTambe:main

Conversation

@RishiTambe
Copy link

Dear Dr. Holdener,

I have resolved issue #40 : Add an option to start over. I have also tried to resolve issue #17 and its half done. You may view it, when you will run the server.

Thanking you for allowing and contributing me towards the ML Code Generator project.

@kate-holdener
Copy link
Collaborator

Hi @RishiTambe, thank you for the pull request. I am using pylint static analysis tool to check if code conforms to coding standards used in the repo. Unfortunately, I didn't have those checks enabled on pull requests, so you can't see automatic results. I've enabled those checks on pull requests now, so all new pull requests should get checked automatically.

Running the checks manually, I see that you changed indentation on many files (probably your IDE did that automatically). If you want to run pylint manually, here's the command I use:
pylint --disable=missing-docstring --indent-string=' ' $(git ls-files "*.py")

@RishiTambe
Copy link
Author

Hi @kate-holdener, Yes, I have used Anaconda 3 for editing and probably indentation was changed automatically.

Following are the Files to be Updated:

  1. base.html
    flask_app---------->template------------>base.html

Line to be added:

  • Start Over
    1. flassk_main.py
      flask_app---------->flask_main.py

    Comment and Function to be added:

    #added start over option in base.html to clear the previous block of code
    @ app.route('/start_over', methods=['GET'])
    def start_over():
    generator.resetone()
    return render_template('home.html')

    1. flask_main.py:

    flask_app---------->flask_main.py----------->def upload_file():

    Comment and Line to be added(before/after line print(g)):

    #call to resetone() in class CodeGenerator in code_generator.py
    generator.resetone()

    1. code_generator.py

    application---------->code_generator.py

    Comment and Function to be added:

    #call to resetAll() function in clas AllBblocks of code_blocks.py
    def resetone(self):
    self.blocks.resetAll()
    self.data = {}

    1. code_blocks.py

    model---------->code_blocks.py---------->AllBlocks Class

    Comment and Function to be added (after init()):

    #clear previously insetred blocks of code
    def resetAll(self):
    self.blocks = deque()

  • @vercel
    Copy link

    vercel bot commented Nov 1, 2022

    The latest updates on your projects. Learn more about Vercel for Git ↗︎

    Name Status Preview Updated
    ml-code-generator ✅ Ready (Inspect) Visit Preview Nov 1, 2022 at 4:24AM (UTC)

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants